// pages/changeAdmin/changeAdmin.js
Page({
    data:{
        picture:"https://7368-shopping-zzx-2gca1k1n6157668b-1319032721.tcb.qcloud.la/%E5%A4%B4%E5%83%8F.jpg?sign=5d14d55ac8dd5ade3740375857c042a5&t=1688018146",
        userId:'',
        user:{
        userName:'',
        useId:'',
        },
    },
    
changeToAccountB:function(){
    var that = this; 
    var app = getApp();
    that.data.userId = app.data.useId;
    wx.request({
        url: 'http://localhost:8080/user/search?userId='+that.data.userId,
        method:'GET',
        header:{
            'content-type':'application/json'
        },
        success:function(res){
            console.log(res.data);
            that.setData({
                user:res.data.data
            })
        }
    })
},
onShow(){
    this.changeToAccountB();
},
changeToAccountA:function(){
    wx.navigateTo({
      url: '/pages/login/login',
    })
},
})